<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button >点击我</button>
    <script type="module">
  //动态加载，只有动态加载才能在dom ，if等条件下进行判断
      document.querySelector("button").addEventListener("click",()=>{
          //动态加载模块
          import ("./onclick.js").then(({Onclick})=>{
            Onclick.show();
          });
      });
     
    </script>
</body>
</html>